<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>登录界面</title>
    <style>
        body {
            font-family: KaiTi, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #f4f4f9;
        }
        .login-form {
            background-color: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .login-form h2 {
            margin-bottom: 20px;
            text-align: center;
        }
        .login-form input[type="text"], .login-form input[type="password"] {
            width: 95%;
            padding: 10px;
            margin: 10px 0;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        .login-form input[type="submit"] {
            width: 100%;
            padding: 10px;
            background-color: #007bff;
            border: none;
            border-radius: 5px;
            color: white;
            font-size: 16px;
            cursor: pointer;
        }
        .login-form input[type="submit"]:hover {
            background-color: #0056b3;
        }
        .login-form .form-links {
            display: flex;
            justify-content: space-between;
            padding: 10px;
        }
        .login-form .form-links a {
            color: #007bff;
            text-decoration: none;
            font-size: 14px;
        }
        .login-form .form-links a:hover {
            text-decoration: underline;
        }
        .login-form input[type="text"]::placeholder, .login-form input[type="password"]::placeholder {
            color: #d71f1f; 
            font-family: KaiTi, sans-serif; 
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div class="login-form">
        <h2>华为云平台</h2>
        <form id="loginForm">
            <input type="text" id="username" name="username" placeholder="请输入用户名" required>
            <input type="password" id="password" name="password" placeholder="请输入密码" required>
            <input type="submit" value="登录">
        </form>
        <div class="form-links">
            <a href="#" id="registerLink">注册</a>
            <a href="#" id="forgetPasswordLink">忘记密码</a>
        </div>
    </div>

    <script>
        document.getElementById('loginForm').addEventListener('submit', function(event) {
            event.preventDefault(); 
            var username = document.getElementById('username').value;
            var password = document.getElementById('password').value;
                alert('用户名: ' + username + '\n密码: ' + password);
        });
        document.getElementById('registerLink').addEventListener('click', function(event) {
            event.preventDefault();
            alert('点击了注册键');
        });
        document.getElementById('forgetPasswordLink').addEventListener('click', function(event) {
            event.preventDefault();
            alert('点击了忘记密码键');
        });
    </script>
</body>
</html>
